// 请求地址
const apiPostUrl = process.env.API_POST_URL ? process.env.API_POST_URL : "http://117.72.80.10:8091";

/**
 * 装配抽奖
 * @param strategyId
 */
export const strategyArmory = (strategyId?: number) => {
    return fetch(`${apiPostUrl}/api/v1/raffle/strategy_armory?strategyId=${strategyId}`, {
        method: 'GET',
        headers: {
            'Content-Type': 'application/json'
        }
    })
}





/**
 * 查询抽奖奖品列表
 * @param strategyId 策略ID
 */
export const queryRaffleAwardList = (strategyId?: number) => {
        return fetch(`${apiPostUrl}/api/v1/raffle/query_raffle_award_list`, {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json;charset=utf-8'
            },
            body: JSON.stringify({strategyId: strategyId})
        });

}

export const randomRaffle = (strategyId?: number) => {

        return fetch(`${apiPostUrl}/api/v1/raffle/random_raffle`, {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json;charset=utf-8'
            },
            body: JSON.stringify({strategyId: strategyId})
        })

}

